|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnegotiator.Agent
public abstract class Agent
A basic negotiation agent. You might want to consider using the BOA framework.
| Field Summary | |
|---|---|
BilateralAtomicNegotiationSession |
fNegotiation
Reference to protocol which is set when experimental setup is enabled. |
protected java.util.HashMap<AgentParameterVariable,AgentParamValue> |
parametervalues
Deprecated. |
int |
sessionNr
A session can be repeated multiple times. |
int |
sessionsTotal
Amount of repetitions of this session, how many times this session is repeated in total. |
java.util.Date |
startTime
Deprecated. |
protected StrategyParameters |
strategyParameters
Parameters given to the agent which may be specified in the agent repository. |
Timeline |
timeline
Use timeline for everything time-related. |
java.lang.Integer |
totalTime
Deprecated. |
UtilitySpace |
utilitySpace
Preference profile of the agent as assigned by the tournamentrunner. |
| Constructor Summary | |
|---|---|
Agent()
Empty constructor used to initialize the agent. |
|
| Method Summary | |
|---|---|
abstract Action |
chooseAction()
this function is called after ReceiveMessage, with an Offer-action. |
void |
endSession(NegotiationResult dUtil)
Method which informs an agent about the utility it received. |
AgentID |
getAgentID()
|
java.lang.String |
getName()
|
java.util.HashMap<AgentParameterVariable,AgentParamValue> |
getParameterValues()
Deprecated. |
int |
getSessionNumber()
|
int |
getSessionsTotal()
|
StrategyParameters |
getStrategyParameters()
|
protected java.lang.String |
getUniqueIdentifier()
|
double |
getUtility(Bid bid)
A convenience method to get the discounted utility of a bid. |
static java.lang.String |
getVersion()
|
void |
init()
This method is called by the protocol every time before starting a new session after the internalInit method is called. |
void |
internalInit(int sessionNr,
int sessionsTotal,
java.util.Date startTimeP,
java.lang.Integer totalTimeP,
Timeline timeline,
UtilitySpace us,
java.util.HashMap<AgentParameterVariable,AgentParamValue> params)
This method is called by the protocol to initialize the agent with a new session information. |
boolean |
isUIAgent()
Determine if this agent is communicating with the user about nego steps. |
protected java.io.Serializable |
loadSessionData()
Loads the Serializable data for the agent. |
void |
parseStrategyParameters(java.lang.String variables)
Used to parse parameters presented in the agent repository. |
void |
ReceiveMessage(Action opponentAction)
informs you which action the opponent did |
static boolean |
restartDataObjectsFolder(java.lang.Object sender)
Restarts the folder "DataObjects", meaning it deletes all files in it and then creates a new empty folder with the same name. |
protected boolean |
saveSessionData(java.io.Serializable dataToSave)
Saves information (dataToSave) about the current session for future loading by the agent, when negotiating again with the specific preference profile referred by "filename". |
void |
setAgentID(AgentID value)
|
void |
setName(java.lang.String pName)
Sets the name of the agent to the given name. |
void |
sleep(double fraction)
Let the agent wait in case of a time-based protocol. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public UtilitySpace utilitySpace
@Deprecated public java.util.Date startTime
@Deprecated public java.lang.Integer totalTime
public Timeline timeline
public int sessionNr
public int sessionsTotal
public BilateralAtomicNegotiationSession fNegotiation
@Deprecated protected java.util.HashMap<AgentParameterVariable,AgentParamValue> parametervalues
protected StrategyParameters strategyParameters
| Constructor Detail |
|---|
public Agent()
| Method Detail |
|---|
public static java.lang.String getVersion()
public void init()
public final void internalInit(int sessionNr,
int sessionsTotal,
java.util.Date startTimeP,
java.lang.Integer totalTimeP,
Timeline timeline,
UtilitySpace us,
java.util.HashMap<AgentParameterVariable,AgentParamValue> params)
startTimeP - totalTimeP - timeline - keeping track of the time in the negotiation.us - utility space of the agent for the session.params - parameters of the agent.public void ReceiveMessage(Action opponentAction)
opponentAction - public abstract Action chooseAction()
public java.lang.String getName()
@Deprecated public java.util.HashMap<AgentParameterVariable,AgentParamValue> getParameterValues()
public final void setName(java.lang.String pName)
pName - to which the agent's name must be set.public double getUtility(Bid bid)
timeline.
bid - of which we are interested in the utility.
UtilitySpacepublic void sleep(double fraction)
Timeline).
fraction - should be between 0 and 1.public boolean isUIAgent()
public void endSession(NegotiationResult dUtil)
dUtil - discounted utility of previous session round.public AgentID getAgentID()
public void setAgentID(AgentID value)
value - to which the agent's ID must be set.public StrategyParameters getStrategyParameters()
public void parseStrategyParameters(java.lang.String variables)
throws java.lang.Exception
variables -
java.lang.Exceptionpublic int getSessionNumber()
public int getSessionsTotal()
protected final boolean saveSessionData(java.io.Serializable dataToSave)
Serializable interface. This
is to make sure the data can be saved.
2) If the function is used more than once regarding the same preference
profile, it will override the data saved from last session with the
new Object "dataToSave".
dataToSave - the data regarding the last session that "agent"
wants to save.
protected java.lang.String getUniqueIdentifier()
protected final java.io.Serializable loadSessionData()
Serializable data for the agent.
If the function "saveSessionData" wasn't used for this type of agent
with the current preference profile of the agent - the data will be null.
Otherwise, it will load the saved data of the agent for this
specific preference profile.
Serializable data if the load is successful,
null otherwise.public static boolean restartDataObjectsFolder(java.lang.Object sender)
sender - the Object trying to reset DataObjectFolder
NOTE: only TournamentRunner is allowed to apply this procedure.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||